


; top of file "xlib.ash"


AH_XLIB             EQU     1h

AH_TYPES            EQU     1h

IDEAL

TYPEDEF              schar               BYTE 

TYPEDEF              uchar               BYTE 

TYPEDEF              ushort              WORD 

TYPEDEF              uint                WORD 

TYPEDEF              ulong               DWORD 

XMAX                EQU     288

YMAX                EQU     240

LINEBYTES           EQU     80

PLANESIZE           EQU     <(LINEBYTES*YMAX)>

SCREENSIZE          EQU     <(PLANESIZE*4)>

BORDER              EQU     16

SCREENCOLORS        EQU     256

PALETTESIZE         EQU     <(3*SCREENCOLORS)>

XTILES              EQU     9

TILEXS              EQU     32

TILEYS              EQU     32

CRISPYSTEPS         EQU     8

STRUC              Sprite              

@Sprite@header      DD      ?
@Sprite@xs_data     DD      ?
@Sprite@ys_data     DD      ?
@Sprite@fsize       DD      ?
@Sprite@xs          DD      ?
@Sprite@ys          DD      ?
@Sprite@frames      DD      ?
@Sprite@speed       DD      ?
@Sprite@x_core      DD      ?
@Sprite@y_core      DD      ?
@Sprite@xs_core     DD      ?
@Sprite@ys_core     DD      ?
@Sprite@data        DD      1 DUP ( ? )

ENDS              Sprite              


SP_NSPRITES         EQU     0

SP_STARTOFINDEX     EQU     1

STRUC              SpritePool          

@SpritePool@anchor  DW      NEAR PTR ?
@SpritePool@sprite  DW      NEAR PTR ?

ENDS              SpritePool          

GLOBAL C            @SpritePool@load$qpzc                :NEAR

GLOBAL C            @SpritePool@unload$qv                :NEAR


STRUC              Palette             

@Palette@rgb        DB      768 DUP ( ? )
@Palette@shadow     DB      256 DUP ( ? )

ENDS              Palette             

GLOBAL C            @Palette@fadergb$qv :NEAR

GLOBAL C            @Palette@fadepalette$qv              :NEAR

GLOBAL C            @Palette@cyclepalette$qiii           :NEAR

GLOBAL C            @Palette@lock$qv    :NEAR

GLOBAL C            @Palette@unlock$qv  :NEAR

GLOBAL C            @Palette@set$qpv    :NEAR

GLOBAL C            @Palette@set$qiii   :NEAR

GLOBAL C            @Palette@calcshadows$qpvi            :NEAR

GLOBAL C            @Palette@calcshadows$qi              :NEAR

GLOBAL C            @Palette@cycle$qiii :NEAR

GLOBAL C            @Palette@stopcycle$qi                :NEAR

GLOBAL C            @Palette@fade$qi    :NEAR

GLOBAL C            @Palette@fade$qiiii :NEAR

GLOBAL C            @Palette@fade$qpvi  :NEAR

GLOBAL C            @Palette@isfading$qv                 :NEAR

GLOBAL C            @Palette@stopfade$qv                 :NEAR

GLOBAL C            @Palette@stopeffects$qv              :NEAR


FD_ID               EQU     0

FD_NCHARS           EQU     1

FD_BASE             EQU     2

FD_PITCH            EQU     3

FD_XSDATA           EQU     4

STRUC              Font                

@Font@anchor        DW      NEAR PTR ?
@Font@xs            DW      NEAR PTR ?
@Font@sprite        DW      NEAR PTR ?

ENDS              Font                

GLOBAL C            @Font@$bctr$qpzc    :NEAR

GLOBAL C            @Font@$bdtr$qv      :NEAR

GLOBAL C            @Font@print$qiipzc  :NEAR

GLOBAL C            @Font@print_c$qiipzc                 :NEAR

GLOBAL C            @Font@vanilla$qiipzci                :NEAR

GLOBAL C            @Font@vanilla_c$qiipzci              :NEAR

GLOBAL C            @Font@vanilla_char$qiizci            :NEAR

GLOBAL C            @Font@textlen$qpzc  :NEAR

GLOBAL C            @Font@charlen$qzc   :NEAR

GLOBAL C            @Font@width$qv      :NEAR

GLOBAL C            @Font@height$qv     :NEAR


STRUC              Back                

@Back@valid         DW      ?
@Back@x             DW      ?
@Back@y             DW      ?
@Back@xs            DW      ?
@Back@ys            DW      ?
@Back@buffer        DW      NEAR PTR ?

ENDS              Back                

GLOBAL C            @Back@$bctr$qii     :NEAR

GLOBAL C            @Back@$bdtr$qv      :NEAR

GLOBAL C            @Back@save$qii      :NEAR

GLOBAL C            @Back@restore$qv    :NEAR

GLOBAL C            @Back@invalidate$qv :NEAR


GLOBAL C            _vscreen            :NEAR PTR BYTE 

GLOBAL C            vscreen             :NEAR PTR BYTE 

GLOBAL C            _shadow             :BYTE  :256

GLOBAL C            palette             :Palette

GLOBAL C            @initgraphics$qv    :NEAR

GLOBAL C            @shutgraphics$qv    :NEAR

GLOBAL C            @setvideomode$qi    :NEAR

GLOBAL C            x_drawsprite        :NEAR

GLOBAL C            x_drawshadow        :NEAR

GLOBAL C            x_drawvanilla       :NEAR

GLOBAL C            x_drawcrispy        :NEAR

GLOBAL C            x_layer0            :NEAR

GLOBAL C            x_layer1            :NEAR

GLOBAL C            x_layer2            :NEAR

GLOBAL C            @allocscreen$qv     :NEAR

GLOBAL C            @freescreen$qpv     :NEAR

GLOBAL C            @setscreen$qpv      :NEAR

GLOBAL C            @copyfull$qv        :NEAR

GLOBAL C            @copyscreen$qv      :NEAR

GLOBAL C            @copyregion$qiiii   :NEAR

GLOBAL C            @copyboth$qiiii     :NEAR

GLOBAL C            @flippage$qv        :NEAR

GLOBAL C            @doeffects$qv       :NEAR

GLOBAL C            @clearregion$qiiii  :NEAR

GLOBAL C            @clear$qi           :NEAR

GLOBAL C            @showpcx$qpvi       :NEAR

GLOBAL C            @getpcxpal$qv       :NEAR

GLOBAL C            @pixelate$qi        :NEAR

GLOBAL C            @retrace$qv         :NEAR

; end of file "xlib.ash"

